package com.mate.cloud.redisson.datatype;

import org.redisson.api.RMap;
import org.redisson.api.RedissonClient;

import java.util.HashMap;
import java.util.Map;

public class HashTest {
    public static void main(String[] args) {
        RedissonClient redissonClient = RedissonClientUtil.getClient();
        RMap<String, Integer> productStatics = redissonClient.getMap("productStatics:1");
//        productStatics.fastReplaceAsync("pv",1);
        Map<String,Integer> map=new HashMap<>();
        map.put("pv",1);
        map.put("uv",1);
        productStatics.putAll(map);
        System.out.println(productStatics.addAndGet("pv",1));

        RMap<String, Integer> shopCar = redissonClient.getMap("productStatics:1");

    }
}
